<template>
  <div style="background-color: white;height: calc(100vh - 1.33333rem);">
    <meta name="format-detection" content="telephone=yes" />
    <div class="columnr bj" >
      <div class="img">
        <van-image
          round
          width="60px"
          height="60px"
          src="https://sqyfximage.oss-cn-qingdao.aliyuncs.com/zhmc/images/touxiang.png"
        />
      </div>
      <div class="name">{{agencyInfo.agencyName}}</div>
    </div>
    <van-divider />

    <div class="rownr" @click="gotoMyquanzi()">
        <div style="padding-top: 25px;">
          <van-image
            round
            width="30px"
            height="30px"
            src="https://sqyfximage.oss-cn-qingdao.aliyuncs.com/zhmc/images/shangquan.png"
          />
        </div>

        <div style="padding-top: 25px;font-size: 20px;padding-left: 10px;">我的圈子</div>
        <div style="padding-top: 25px;position: absolute;right: 15px;">
          <van-image
            width="20px"
            height="20px"
            src="https://sqyfximage.oss-cn-qingdao.aliyuncs.com/zhmc/images/fxy.png"
          />
        </div>

    </div>

    <van-divider />
    <div class="rownr" @click="docall('4008001556')">
      <div style="padding-top: 10px;">
        <van-image
          round
          width="30px"
          height="30px"
          src="https://sqyfximage.oss-cn-qingdao.aliyuncs.com/zhmc/images/lianxikefu.png"
        />
      </div>

      <div style="padding-top: 10px;font-size: 20px;padding-left: 10px;">联系客服</div>
      <div style="padding-top: 15px;position: absolute;right: 15px;">
        <van-image
          width="20px"
          height="20px"
          src="https://sqyfximage.oss-cn-qingdao.aliyuncs.com/zhmc/images/fxy.png"
        />
      </div>

    </div>
    <van-divider />
  </div>
</template>

<script>

import { queryCompanyInfo, queryPlatformProductCategory, saveShareInfo, uploadShareImg, queryAgencyinfo } from '../../api/api'
import { Dialog, Toast } from 'vant'
import { Divider } from 'vant'

export default {
  name: 'Mine',
  data() {
    return {
      agencyid: '',
      agencyInfo: {}
    }
  },
  created() {
    const agencyIdStore = this.$store.getters.agencyId
    this.agencyid = agencyIdStore
    this.queryAgencyinfo()
  },
  methods: {

    gotoMyquanzi() {
      this.$router.push({ path: '/myquanzi', query: {}})
    },

    queryAgencyinfo() {
      const param = { agencyid: this.agencyid }

      queryAgencyinfo(param).then(res => {
        if (res.code == 200) {
          console.log(res)
          this.agencyInfo = res.data
        }
      })
    },

    docall(phoneNumber) {
      window.location.href = 'tel:' + phoneNumber
    }

  }
}
</script>

<style scoped>

  .columnr{
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;

  }

  .name{
    padding-top: 10px;
    padding-left: 10px;
    padding-bottom: 10px;
    font-size: 20px;
    color: #466BAC;
  }

  .rownr{
    padding-left: 20px;
    display: flex;
    flex-direction: row;
    justify-content: flex-start;
    align-items: flex-start;
    width: 100%;
  }

  .jt{
    width: 30px;
    height: 30px;
  }

  .bj{
    padding-top: 20px;
  }

</style>
